package com.learn.facade;

import lombok.extern.slf4j.Slf4j;

/**
 * <p>项目名称: design-pattern </p>
 * <p>文件名称: Facade </p>
 */
@Slf4j
public class Facade {

    private Part1 part1;
    private Part2 part2;
    private Part3 part3;

    public Facade() {
        part1 = new Part1();
        part2 = new Part2();
        part3 = new Part3();
    }

    public void start(){
        log.info("开始");
        part1.start();
        part2.start();
        part3.start();
    }

    public void process(){
        log.info("进程中");
        part1.process();
        part2.process();
        part3.process();
    }

    public void end(){
        part1.end();
        part2.end();
        part3.end();
        log.info("结束");
    }
}
